package com.rongke.model;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.rongke.utils.DateJsonDeserializer;
import com.rongke.utils.DateJsonSerializer;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @User
 * @用户基本信息(user)
 * @version : Ver 1.0
 */
@TableName("user")
public class User implements Serializable {
	@TableField(exist = false)
	private static final long serialVersionUID = 1L;

	@TableField(exist = false)
	private String referralCode;

	/***
	 *验证码
	 */
	private  transient String code;

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	/***
  * 代理商推广码
  * */

     private String	codedl;

	public String getCodedl() {
		return codedl;
	}

	public void setCodedl(String codedl) {
		this.codedl = codedl;
	}

	/**
	  * 代理
	  * */
	 private transient  Channel channel;
    /***
	 * 代理层级
	 * */



	public Channel getChannel() {
		return channel;
	}

	public void setChannel(Channel channel) {
		this.channel = channel;
	}

	/**
	 * 身份证
	 * */

	 private transient  UserAuthMsg userAuthMsg;

	public UserAuthMsg getUserAuthMsg() {
		return userAuthMsg;
	}

	public void setUserAuthMsg(UserAuthMsg userAuthMsg) {
		this.userAuthMsg = userAuthMsg;
	}

	/**
	 * @备注:
	 * @字段:id BIGINT(19)
	 */
	@TableId(type = IdType.AUTO)
	private Long id;


	/**
	 * @备注:
	 * @字段:gmt_datetime DATETIME(19)
	 */
	@JsonSerialize(using=DateJsonSerializer.class)
	@JsonDeserialize(using=DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private java.util.Date gmtDatetime = new java.util.Date();


	public String getReferralCode() {
		return referralCode;
	}

	public void setReferralCode(String referralCode) {
		this.referralCode = referralCode;
	}

	/**
	 * @备注:
	 * @字段:upt_datetime DATETIME(19)
	 */
	@JsonSerialize(using=DateJsonSerializer.class)

	@JsonDeserialize(using=DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private java.util.Date uptDatetime = new java.util.Date();


	/**
	 * @备注:
	 * @字段:uuid VARCHAR(256)
	 */
	@Column(updatable = false,columnDefinition="VARCHAR(256) COMMENT ''")
	private String uuid = java.util.UUID.randomUUID().toString().replaceAll("-","");


	/**
	 * @备注:用户名
	 * @字段:user_name VARCHAR(128)
	 */
	private String userName;


	/**
	 * @备注:密码
	 * @字段:password VARCHAR(45)
	 */
	private String password;


	/**
	 * @备注:头像
	 * @字段:head_img VARCHAR(256)
	 */
	private String headImg;


	/**
	 * @备注:手机
	 * @字段:phone VARCHAR(45)
	 */
	private String phone;


	/**
	 * @备注:用户类型1普通会员
	 * @字段:user_type INT(10)
	 */
	private Integer userType;


	/**
	 * @备注:认证状态，默认0表示未认证，1表示已认证
	 * @字段:auth_status INT(10)
	 */
	private Integer authStatus;


	/**
	 * @备注:
	 * @字段:token VARCHAR(256)
	 */
	private String token;


	/**
	 * @备注:默认1表示正常，2表示黑名单，3表示禁用，4被拒绝(拒绝后，一月之后可借款)
	 * @字段:status INT(10)
	 */
	private Integer status;


	/**
	 * @备注:支付密码
	 * @字段:pay_pwd VARCHAR(45)
	 */
	private String payPwd;


	/**
	 * @备注:设备标识
	 * @字段:phone_sign VARCHAR(255)
	 */
	private String phoneSign;


	/**
	 * @备注:当前是否有未完成订单0否1是
	 * @字段:is_pay INT(10)
	 */
	private Integer isPay;


	/**
	 * @备注:是否为老客户
	 * @字段:is_old INT(10)
	 */
	private Integer isOld;


	/**
	 * @备注:一级代理
	 * @字段:channel_one_id BIGINT(19)
	 */
	private Long channelOneId;


	/**
	 * @备注:二级代理
	 * @字段:channel_two_id BIGINT(19)
	 */
	private Long channelTwoId;


	/**
	 * @备注:三级代理
	 * @字段:channel_three_id BIGINT(19)
	 */
	private Long channelThreeId;


	public BigDecimal getTotalassets() {
		return totalassets;
	}

	public void setTotalassets(BigDecimal totalassets) {
		this.totalassets = totalassets;
	}

	/**
	 * @备注
	 * @字段 totalassets decimal(25)
	 * */

	private java.math.BigDecimal totalassets;



	public User(){
	}

	public User(
		Long id
	){
		this.id = id;
	}



	public void setId(Long id) {
		this.id = id;
	}

	public Long getId() {
		return this.id;
	}


	public void setGmtDatetime(java.util.Date gmtDatetime) {
		this.gmtDatetime = gmtDatetime;
	}

	public java.util.Date getGmtDatetime() {
		return this.gmtDatetime;
	}


	public void setUptDatetime(java.util.Date uptDatetime) {
		this.uptDatetime = uptDatetime;
	}

	public java.util.Date getUptDatetime() {
		return this.uptDatetime;
	}


	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public String getUuid() {
		return this.uuid;
	}


	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserName() {
		return this.userName;
	}


	public void setPassword(String password) {
		this.password = password;
	}

	public String getPassword() {
		return this.password;
	}


	public void setHeadImg(String headImg) {
		this.headImg = headImg;
	}

	public String getHeadImg() {
		return this.headImg;
	}


	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getPhone() {
		return this.phone;
	}


	public void setUserType(Integer userType) {
		this.userType = userType;
	}

	public Integer getUserType() {
		return this.userType;
	}


	public void setAuthStatus(Integer authStatus) {
		this.authStatus = authStatus;
	}

	public Integer getAuthStatus() {
		return this.authStatus;
	}


	public void setToken(String token) {
		this.token = token;
	}

	public String getToken() {
		return this.token;
	}


	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getStatus() {
		return this.status;
	}


	public void setPayPwd(String payPwd) {
		this.payPwd = payPwd;
	}

	public String getPayPwd() {
		return this.payPwd;
	}


	public void setPhoneSign(String phoneSign) {
		this.phoneSign = phoneSign;
	}

	public String getPhoneSign() {
		return this.phoneSign;
	}


	public void setIsPay(Integer isPay) {
		this.isPay = isPay;
	}

	public Integer getIsPay() {
		return this.isPay;
	}


	public void setIsOld(Integer isOld) {
		this.isOld = isOld;
	}

	public Integer getIsOld() {
		return this.isOld;
	}


	public void setChannelOneId(Long channelOneId) {
		this.channelOneId = channelOneId;
	}

	public Long getChannelOneId() {
		return this.channelOneId;
	}


	public void setChannelTwoId(Long channelTwoId) {
		this.channelTwoId = channelTwoId;
	}

	public Long getChannelTwoId() {
		return this.channelTwoId;
	}


	public void setChannelThreeId(Long channelThreeId) {
		this.channelThreeId = channelThreeId;
	}

	public Long getChannelThreeId() {
		return this.channelThreeId;
	}
}
